FROM debian:stable AS base

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update -y && apt upgrade -y
RUN apt install -y sudo devscripts

RUN --mount=source=.,target=/mnt,type=bind \
  /mnt/tools/buildutils/installbazel.sh

COPY ./tools/buildutils/build_package.sh /build_package.sh

ENTRYPOINT ["/build_package.sh"]
